package com.huiyeji.idempotent;

import com.alibaba.fastjson.JSON;
import org.springframework.util.DigestUtils;

/**
 * @author zhaoduo
 */
public class MD5KeyGenerator implements KeyGenerator{

    public String getIdempotentKey(ParamContext context) {
        return DigestUtils.md5DigestAsHex(JSON.toJSONString(context).getBytes());
    }
}
